<!DOCTYPE html>
<html>
  <head lang="en">
    <link rel="stylesheet" type="text/css" href="style.css" />
    <meta charset="UTF-8" />
    <title></title>
  </head>
  <body>
    <script src="https://unpkg.com/lodash@4.17.2/lodash.min.js"></script>
    <script src="https://unpkg.com/benchmark@2.1.2"></script>

    <script
      src="https://code.jquery.com/jquery-3.1.0.slim.min.js"
      integrity="sha256-cRpWjoSOw5KcyIOaZNo4i6fZ9tKPhYYb6i5T9RSVJG8="
      crossorigin="anonymous"
    ></script>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/tinysort/2.3.6/tinysort.min.js"></script>

    <div class="container">
      <h1 style="text-align: center">Next</h1>
      <!-- left part -->
      <div class="row">
        <!--right part-->
        <div class="col-lg-6">
          <div id="resultsContainer">
            <button onclick="onRunAll()" id="runAllButton">
              Run Lex And Parse
            </button>
            <button
              onclick="onRunAll({lexerOnly:true, parserOnly:false})"
              id="runAllButton_lexer"
            >
              Run Lexer Only
            </button>
            <button
              onclick="onRunAll({lexerOnly:false, parserOnly:true})"
              id="runAllButton_parser"
            >
              Run Parser Only
            </button>
            <div id="wait" style="margin-left: auto; margin-right: auto">
              &nbsp;
            </div>
            <div class="headerRow">
              <div class="benchName">Library</div>
              <div class="benchRate">Ops/sec</div>
              <div class="benchSpeed">Relative Speed</div>
              <div class="benchInclude">?</div>
            </div>

            <div id="dataRows">
              <div class="dataRow JSON">
                <div class="benchName">
                  <a>JSON</a>
                </div>
                <div class="benchRate">
                  <div class="value">&nbsp;</div>
                  <div class="delta">&nbsp;</div>
                </div>
                <div class="benchSpeed">&nbsp;</div>
                <div class="benchInclude">
                  <input type="checkbox" checked="checked" />
                </div>
              </div>

              <div class="dataRow CSS">
                <div class="benchName">
                  <a>CSS</a>
                </div>
                <div class="benchRate">
                  <div class="value">&nbsp;</div>
                  <div class="delta">&nbsp;</div>
                </div>
                <div class="benchSpeed">&nbsp;</div>
                <div class="benchInclude">
                  <input type="checkbox" checked="checked" />
                </div>
              </div>

              <div class="dataRow ECMA5">
                <div class="benchName">
                  <a>ECMA5</a>
                </div>
                <div class="benchRate">
                  <div class="value">&nbsp;</div>
                  <div class="delta">&nbsp;</div>
                </div>
                <div class="benchSpeed">&nbsp;</div>
                <div class="benchInclude">
                  <input type="checkbox" checked="checked" />
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>

      <hr />
    </div>

    <script src="lib/iframe_loader.js"></script>
    <script>
      localStorage.setItem("myCat", "Tom")

      self.mode = "next"
      var jsonNextFrame = includeTestIFrame(
        "JSON",
        "./parsers/json/json.html",
        mode
      )
      var cssNextFrame = includeTestIFrame("CSS", "./parsers/css/css.html", self.mode)
      var ecma5NextFrame = includeTestIFrame(
        "ECMA5",
        "./parsers/ecma5/ecma5.html",
        self.mode
      )

      var testCases = {
        JSON: function (suite) {
          addTest(suite, "JSON", jsonNextFrame.parse)
        },

        CSS: function (suite) {
          addTest(suite, "CSS", cssNextFrame.parse)
        },

        ECMA5: function (suite) {
          addTest(suite, "ECMA5", ecma5NextFrame.parse)
        }
      }
    </script>
    <script src="lib/bench_logic.js"></script>
  </body>
</html>
